<template>
  <div class="container2">
    <h2>子组件</h2>
    <p>{{modelValue}}</p>
    <button @click="fn">点击修改</button>
  </div>
</template>
<script>
import { } from 'vue'
export default {
  name: 'Son',
  props: {
    modelValue: {
      type: Number,
      default: 0
    }
  },
  setup (props, { emit }) {
    const fn = () => {
      emit('update:modelValue', 100)
    }
    return { fn }
  }
}
</script>
<style scoped lang="less"></style>